<extend name="Common/common"/>
<block name="main">
	<div class="aui-content">
		<div class="me-comment">
    		<img src="__IMG__/green.png"><span class="me-com-com">手术和外伤</span>
		</div>
		<div class="me-wrap-click hurt">
            <span class="me-pa-click <if condition="$hurt eq '无'">  me-click <else />me-noclick </if> ">无</span>
            <span class="me-pa-click <if condition="$hurt eq '颈部手术'">  me-click <else />me-noclick </if> ">颈部手术</span>
            <span class="me-pa-click <if condition="$hurt eq '头部手术'">  me-click <else />me-noclick </if> ">头部手术</span>
            <span class="me-pa-click <if condition="$hurt eq '胸部手术'">  me-click <else />me-noclick </if> ">胸部手术</span>
            <span class="me-pa-click <if condition="$hurt eq '腹部手术'">  me-click <else />me-noclick </if>">腹部手术</span>
            <span class="me-pa-click <if condition="$hurt eq '背部手术'">  me-click <else />me-noclick </if>">背部手术</span>
            <span class="me-pa-click <if condition="$hurt eq '四肢手术'">  me-click <else />me-noclick </if>">四肢手术</span>
            <span class="me-pa-click <if condition="$hurt eq '皮肤软组织损伤'">  me-click <else />me-noclick </if>">皮肤软组织损伤</span>
            <span class="me-pa-click <if condition="$hurt eq '烧伤'">  me-click <else />me-noclick </if>">烧伤</span>
            <span class="me-pa-click <if condition="$hurt eq '烫伤'">  me-click <else />me-noclick </if>">烫伤</span>
            <span class="me-pa-click <if condition="$hurt eq '肌腱损伤'">  me-click <else />me-noclick </if>">肌腱损伤</span>
            <span class="me-pa-click <if condition="$hurt eq '刀砍伤'">  me-click <else />me-noclick </if>">刀砍伤</span>

		</div>
		<div class="me-peac-text">
     		<textarea rows="4" cols="50" name="buchong" id="buchong" placeholder="可补充您的手术和外伤">{$buchong}</textarea>
		</div>
	</div>
</block>
<block name="js">
    <script type="text/javascript">
        $(".me-pa-click").click(function(){
            $(this).addClass("me-click");
            $(this).siblings().removeClass("me-click");
            $(this).siblings().addClass("me-noclick");
        })

        $(function(){
            //保存事件
            var issend = false;
            $('#add').click(function(){
                if(issend) return false;
                issend = true;
                var hurt =$(".hurt .me-click").text()
                var buchong=$('#buchong').val();
                if(buchong){
                    var operation_trauma =hurt+'、'+buchong;
                }else{
                    var operation_trauma =hurt;
                }

                $.post(location.href,{operation_trauma:operation_trauma},function (data){
                    issend = false;
                    if(data.code==0){
                        layer_msg('保存信息成功',1,function(){
                            window.history.go(-1);
                        });
                    }else{
                        layer_msg(data.msg);
                    }
                },'json');
            });
        });
    </script>
</block>